<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>js serialize demo</title>
</head>
<body>
<form>
    <input type="text" name="name" value="name">
    <input type="tel" name="tel" value="186213455">
    <input type="password" name="pwd" value="hahenfjkwf">
    <input type="submit">

</form>
</body>
<script src="../js/jquery-2.1.1.min.js"></script>
<script>
    /*use jsonp*/
    $(function () {
        $('form').submit(function (e) {
            e.preventDefault();
            var data1 = $('form').serialize();
//            console.log(data1);
            var data = btoa(data1);
//            console.log(data);
//            console.log(atob(data));
            $.ajax({
                type: 'GET',
                url: 'http://endless.com/test.php',
                dataType: 'jsonp',
                data: {data: data},
                success: function (res) {
                    console.log(res);
                }
            })
        });
        Object.create()
    })
</script>
</html>